package com.atguigu.srb.core.pojo.vo;

import java.math.BigDecimal;

/**
 * @program: srb
 * @author: 龙龙
 * @create: 2022-02-23 16:48
 * @description:
 **/
public class main {
    public static void main(String[] args) {
        BigDecimal b1 = new BigDecimal("0.01");
        BigDecimal b2 = new BigDecimal(0.01d);
        BigDecimal b3 = new BigDecimal(0.01f);

        int i = b2.compareTo(b3);
        System.out.println(i);

        BigDecimal b4 = new BigDecimal("6");
        BigDecimal b5 = new BigDecimal("7");
        BigDecimal add = b4.add(b5);
        System.out.println("add"+add);

        BigDecimal subtract = b4.divide(b5,4,BigDecimal.ROUND_HALF_DOWN);
        System.out.println("divide = "+subtract);
    }
}
